// 引入axios实例
import request from '@/utils/request'
export default{
  /**
    * 1、新增课时
    */
  saveVideo(video) {
    return request({
      url: '/admin/edu/video/save',
      method: 'post',
      data: video
    })
  },
  /**
    * 2、根据id删除课时
    */
  deleteVideo(videoId) {
    return request({
      url: `/admin/edu/video/removeById/${videoId}`,
      method: 'delete'
    })
  },
  /**
    * 3、根据id查询课时
    */
  getVideo(videoId) {
    return request({
      url: `/admin/edu/video//getById/${videoId}`,
      method: 'get'
    })
  },
  /**
    * 4、更新课时
    */
  updateVideo(video) {
    return request({
      url: '/admin/edu/video/update',
      method: 'put',
      data: video
    })
  }
}
